﻿Public Class clsProdInfo
    Public Function getProdInfoById(prod_id As String) As DataTable
        Dim szSql As String = ""
        szSql &= "SELECT * FROM sf.b_prod_info WHERE 1 = 1 and factory_id = ? and prod_id = ? "
        Dim dt As DataTable = DBacs.ExecuteSql(szSql, -1, "TS", prod_id)
        If IsNothing(dt) Then
            getProdInfoById = New DataTable
        Else
            getProdInfoById = dt
        End If
    End Function

    Public Function getLHList() As DataTable
        Dim szSql As String = String.Empty
        szSql &= "select a.*,b.mes_project_name,c.name as in_vu_bz_name from sf.b_prod_info a "
        szSql &= " left join sf.b_pgd_lh_details b on a.b_pgd_lh_details_sys_id = b.sys_id "
        szSql &= " left join sf.t_mst_bz c on a.in_vu_bz = c.sys_id "
        szSql &= " where 1=1 "
        szSql &= "and cast(a.status as integer) = 5 "
        szSql &= " order by into_vu_time "
        Dim dt As DataTable = DBacs.ExecuteSql(szSql, -1)
        If IsNothing(dt) Then
            getLHList = New DataTable
        Else
            getLHList = dt
        End If
    End Function

End Class
